package com.example.dormmanage.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@ApiModel("水电费表")
@TableName(value = "water_elec")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Bills {

    @ApiModelProperty("id")
    @TableId
    private Long id;

    @ApiModelProperty("宿舍id")
    private Integer roomId;

    @ApiModelProperty("用水量")
    private Double usedWater;

    @ApiModelProperty("用电量")
    private Double usedElec;

    @ApiModelProperty("水费")
    private Double waterBills;

    @ApiModelProperty("电费")
    private Double ElecBills;

    @ApiModelProperty("所属日期")
    private String uploadTime;

    @ApiModelProperty("缴费状态(0->待上传,1->待缴费,2->已缴费)")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT,select = false)
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE,select = false)
    private LocalDateTime updateTime;
}

